﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Nvigorate.Extensions
{
    public static class IDictionaryExtenders
    {
        public static K GetKeyForValue<K,V>(this IDictionary<K,V> dictionary, V value)
        {
            return dictionary.FirstOrDefault(kvp => kvp.Value.Equals(value)).Key;
        }
    }
}
